﻿using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace SubStationManagement.Server.Models
{
    public class MeasureSample
    {
        [BsonId]
        [BsonRepresentation(BsonType.ObjectId)]
        [Display(Name = "Id")]
        [NotNull]
        public string? Id { get; set; }

        /// <summary>
        /// 获得/设置 模块Id
        /// </summary>
        [Display(Name = "模块Id")]
        [NotNull, Required]
        public int ModuleId { get; set; }

        /// <summary>
        /// 获得/设置 回路编号
        /// </summary>
        [Display(Name = "回路编号")]
        [NotNull, Required]
        public EnumMeasureLoopNumber LoopNumber { get; set; }

        /// <summary>
        /// 获得/设置 时间戳
        /// </summary>
        [Display(Name = "时间戳")]
        [NotNull, Required]
        public DateTime TimeStamp { get; set; }


        /// <summary>
        /// 获得/设置 A相电流有效值
        /// </summary>
        [Display(Name = "A相电流有效值")]
        public double? IA { get; set; }

        /// <summary>
        /// 获得/设置 B相电流有效值
        /// </summary>
        [Display(Name = "B相电流有效值")]
        public double? IB { get; set; }

        /// <summary>
        /// 获得/设置 C相电流有效值
        /// </summary>
        [Display(Name = "C相电流有效值")]
        public double? IC { get; set; }


        /// <summary>
        /// 获得/设置 A相电压有效值
        /// </summary>
        [Display(Name = "A相电压有效值")]
        public double? VA { get; set; }

        /// <summary>
        /// 获得/设置 B相电压有效值
        /// </summary>
        [Display(Name = "B相电压有效值")]
        public double? VB { get; set; }

        /// <summary>
        /// 获得/设置 C相电压有效值
        /// </summary>
        [Display(Name = "C相电压有效值")]
        public double? VC { get; set; }


        /// <summary>
        /// 获得/设置 A相有功功率
        /// </summary>
        [Display(Name = "A相有功功率")]
        public double? PA { get; set; }

        /// <summary>
        /// 获得/设置 B相有功功率
        /// </summary>
        [Display(Name = "B相有功功率")]
        public double? PB { get; set; }

        /// <summary>
        /// 获得/设置 C相有功功率
        /// </summary>
        [Display(Name = "C相有功功率")]
        public double? PC { get; set; }


        /// <summary>
        /// 获得/设置 A相因数
        /// </summary>
        [Display(Name = "A相因数")]
        public double? PFA { get; set; }

        /// <summary>
        /// 获得/设置 B相因数
        /// </summary>
        [Display(Name = "B相因数")]
        public double? PFB { get; set; }

        /// <summary>
        /// 获得/设置 C相因数
        /// </summary>
        [Display(Name = "C相因数")]
        public double? PFC { get; set; }


        /// <summary>
        /// 获得/设置 A相无功功率
        /// </summary>
        [Display(Name = "A相无功功率")]
        public double? QA { get; set; }

        /// <summary>
        /// 获得/设置 B相无功功率
        /// </summary>
        [Display(Name = "B相无功功率")]
        public double? QB { get; set; }

        /// <summary>
        /// 获得/设置 C相无功功率
        /// </summary>
        [Display(Name = "C相无功功率")]
        public double? QC { get; set; }


        /// <summary>
        /// 获得/设置 A相正向有功电量
        /// </summary>
        [Display(Name = "A相正向有功电量")]
        public double? PPEA { get; set; }

        /// <summary>
        /// 获得/设置 B相正向有功电量
        /// </summary>
        [Display(Name = "B相正向有功电量")]
        public double? PPEB { get; set; }

        /// <summary>
        /// 获得/设置 C相正向有功电量
        /// </summary>
        [Display(Name = "C相正向有功电量")]
        public double? PPEC { get; set; }


        /// <summary>
        /// 获得/设置 A相正向无功电量
        /// </summary>
        [Display(Name = "A相正向无功电量")]
        public double? PQEA { get; set; }

        /// <summary>
        /// 获得/设置 B相正向无功电量
        /// </summary>
        [Display(Name = "B相正向无功电量")]
        public double? PQEB { get; set; }

        /// <summary>
        /// 获得/设置 C相正向无功电量
        /// </summary>
        [Display(Name = "C相正向无功电量")]
        public double? PQEC { get; set; }


        /// <summary>
        /// 获得/设置 A相反向有功电量
        /// </summary>
        [Display(Name = "A相反向有功电量")]
        public double? NPEA { get; set; }

        /// <summary>
        /// 获得/设置 B相反向有功电量
        /// </summary>
        [Display(Name = "B相反向有功电量")]
        public double? NPEB { get; set; }

        /// <summary>
        /// 获得/设置 C相反向有功电量
        /// </summary>
        [Display(Name = "C相反向有功电量")]
        public double? NPEC { get; set; }


        /// <summary>
        /// 获得/设置 A相反向无功电量
        /// </summary>
        [Display(Name = "A相反向无功电量")]
        public double? NQEA { get; set; }

        /// <summary>
        /// 获得/设置 B相反向无功电量
        /// </summary>
        [Display(Name = "B相反向无功电量")]
        public double? NQEB { get; set; }

        /// <summary>
        /// 获得/设置 C相反向无功电量
        /// </summary>
        [Display(Name = "C相反向无功电量")]
        public double? NQEC { get; set; }


        /// <summary>
        /// 获得/设置 频率
        /// </summary>
        [Display(Name = "频率")]
        public double? Frequency { get; set; }


        /// <summary>
        /// 获得/设置 总有功功率
        /// </summary>
        [Display(Name = "总有功功率")]
        public double? PT { get; set; }

        /// <summary>
        /// 获得/设置 总功率因数
        /// </summary>
        [Display(Name = "总功率因数")]
        public double? PFT { get; set; }

        /// <summary>
        /// 获得/设置 总无功功率
        /// </summary>
        [Display(Name = "总无功功率")]
        public double? QT { get; set; }



        /// <summary>
        /// 获得/设置 正向总有功电量
        /// </summary>
        [Display(Name = "正向总有功电量")]
        public double? PPE { get; set; }

        /// <summary>
        /// 获得/设置 正向总无功电量
        /// </summary>
        [Display(Name = "正向总无功电量")]
        public double? PQE { get; set; }

        /// <summary>
        /// 获得/设置 反向总有功电量
        /// </summary>
        [Display(Name = "反向总有功电量")]
        public double? NPE { get; set; }

        /// <summary>
        /// 获得/设置 反向总无功电量
        /// </summary>
        [Display(Name = "反向总无功电量")]
        public double? NQE { get; set; }
    }
}
